package com.linwen.excise.huaweiOJ;

import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

/**
 * @ClassName HJ3_明明的随机数
 * @Description
 * @Author lin
 * @Date 2022/2/20 下午7:55
 * @Version V1.0
 */
public class HJ3_明明的随机数 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            //获取个数
            int num = sc.nextInt();
            //创建TreeSet进行去重排序
            TreeSet set = new TreeSet();
            //输入
            for (int i = 0; i < num; i++) {
                set.add(sc.nextInt());
            }

            //输出
            Iterator iterator = set.iterator();
            while (iterator.hasNext()) {
                System.out.println(iterator.next());
            }
        }
    }
}
